what is pure function in javascript